//    entity language compiler Copyright (C) 2011 Vincent Belliard

//    This program is free software: you can redistribute it and/or modify
//    it under the terms of the GNU General Public License as published by
//    the Free Software Foundation version 3 of the License.

//    This program is distributed in the hope that it will be useful,
//    but WITHOUT ANY WARRANTY; without even the implied warranty of
//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//    GNU General Public License for more details.

//    You should have received a copy of the GNU General Public License
//    along with this program.  If not, see <http://www.gnu.org/licenses/>.

class T_global : public LINK<T_global>
	{
public:
	T_entity_location location ;
	int constant ;
	T_string name ;
	T_expression *type_expression ;
	T_type *type ;
	T_expression *expression ;
	T_global(const T_entity_location &new_location, int new_constant) : location(new_location) { constant = new_constant ; type_expression = NULL ; type = NULL ; expression = NULL ; }
	int is_block(void) const { return (expression != NULL) && expression->is_block() ; }
	void dump(FILE *file) const ;
	void parse(T_entity_compiler *compiler) ;
	void verify_semantic(T_entity_compiler *compiler, T_entity_program *program, T_scope *scope) ;
	void generate_declaration(FILE *file) ;
	void generate_definition(FILE *file) ;
	} ;
